Tumor=$1

## vcf
echo "##fileformat=VCFv4.2" > ${MutationTime_path}/input/${Tumor}_header.vcf
echo "##INFO=<ID=t_ref_count,Number=1,Type=Integer,Description=\"t_ref_count\"" >> ${MutationTime_path}/input/${Tumor}_header.vcf
echo "##INFO=<ID=t_alt_count,Number=1,Type=Integer,Description=\"t_alt_count\"" >> ${MutationTime_path}/input/${Tumor}_header.vcf

${Rscript} ${scripts_path}/mutationTime/MutationTime_GetVCF.R \
--sample ${Tumor} \
--ccf_file ${Titan_path}/chat/${Tumor}_CHAT.txt \
--out_file ${MutationTime_path}/input/${Tumor}.vcf

cat ${MutationTime_path}/input/${Tumor}.vcf >> ${MutationTime_path}/input/${Tumor}_header.vcf
rm ${MutationTime_path}/input/${Tumor}.vcf
mv ${MutationTime_path}/input/${Tumor}_header.vcf ${MutationTime_path}/input/${Tumor}.vcf

## CNV
ln -snf ${Titan_path}/FinalModel/${Tumor}_*.seg ${MutationTime_path}/input/${Tumor}.seg